balance=int(input())
if balance<0:
balance*=-1
digit1=balance%10
balance=balance//10
digit2=balance%10
balance=balance//10
if digit1>digit2:
print(-1*((balance*10)+digit2))
else:
print(-1*((balance*10)+digit1))
else:
print(balance)
// AUTHOR - MALAY ZALAWADIA
// DATE - 29-01-2022
#include <iostream>
#include <bits/stdc++.h>
#define ll long long
#define lld long double
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define fl(i,n) for(ll i=0;i<n;i++)
#define fll(i,n,m) for(ll i=n;i<=m;i++)
#define rl(i,n,m) for(ll i=n;i>=m;i--)
#define py cout<<"YES"<< endl;
#define pn cout<<"NO"<< endl;
#define pi 3.141592653589793238
#define vr(v) v.begin(),v.end()
#define rv(v) v.end(),v.begin()
#define Code ios_base::sync_with_stdio(false);
#define By cin.tie(NULL);
#define MMZ cout.tie(NULL);
using namespace std;
ll gcd(ll a, ll b){if (b == 0)return a;return gcd(b, a % b);}
ll lcm(ll a, ll b){return (a/gcd(a,b)*b);}
string decToBinary(int n){string s="";int i = 0;while (n > 0) {s =to_string(n % 2)+s;n = n / 2;i++;}return s;}
ll binaryToDecimal(string n){string num = n;ll dec_value = 0;int base = 1;int len = num.length();for(int i = len - 1; i >= 0; i--){if (num[i] == '1')dec_value += base;base = base * 2;}return dec_value;}
bool isPrime(ll n){if(n<=1)return false;if(n<=3)return true;if(n%2==0||n%3==0)return false;for(int i=5;i*i<=n;i=i+6)if(n%i==0||n%(i+2)==0)return false;return true;}
bool nextPrime(ll N){if (N <= 1)return 2;ll prime = N;bool found = false;while (!found) {prime++;if (isPrime(prime)) found = true;}return prime;}
bool isPowerOfTwo(int n){if(n==0)return false;return (ceil(log2(n)) == floor(log2(n)));}
bool isPerfectSquare(ll x){if (x >= 0) {ll sr = sqrt(x);return (sr * sr == x);}return false;}
ll moduloMultiplication(ll a,ll b,ll mod){ll res = 0;a %= mod;while (b){if (b & 1)res = (res + a) % mod;b >>= 1;}return res;}
ll powermod(ll x, ll y, ll p){ll res = 1;x = x % p;if (x == 0) return 0;while (y > 0){if (y & 1)res = (res*x) % p;y = y>>1;x = (x*x) % p;}return res;}
void mmz() {
}
int main() {
//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);
/*Code By MMZ
ll t;
cin>>t;
while(t--) {
mmz();
}*/
//mmz();
ll n;
while(cin >> n) {
if(n > 0) {
cout << n << endl;
continue;
}
ll x = n/10;
ll y = (n/100)*10 - (abs(n)%10);
cout << max(x,y);
}
}
1711A - Perfect Permutation | 1701B - Permutation |
1692A - Marathon | 1066A - Vova and Train |
169B - Replacing Digits | 171D - Broken checker |
380C - Sereja and Brackets | 1281B - Azamon Web Services |
1702A - Round Down the Price | 1681C - Double Sort |
12A - Super Agent | 1709A - Three Doors |
1680C - Binary String | 1684B - Z mod X = C |
1003A - Polycarp's Pockets | 1691B - Shoe Shuffling |
1706A - Another String Minimization Problem | 1695B - Circle Game |
1702B - Polycarp Writes a String from Memory | 1701A - Grass Field |
489C - Given Length and Sum of Digits | 886B - Vlad and Cafes |
915A - Garden | 356A - Knight Tournament |
1330A - Dreamoon and Ranking Collection | 1692B - All Distinct |
1156C - Match Points | 1675A - Food for Animals |
1328C - Ternary XOR | 1689A - Lex String |